import { Outlet } from "umi";
import {
    legacyLogicalPropertiesTransformer,
    StyleProvider,
} from "@ant-design/cssinjs";
import { ConfigProvider } from "antd";
import zhCN from "antd/es/locale/zh_CN";

console.log('There is only one real heroism. To see the world as it is and to love it. ——Roman Rolland');
export default function Layout() {

    return (
        <StyleProvider
            transformers={[legacyLogicalPropertiesTransformer]}
            hashPriority="high"
        >
            <ConfigProvider locale={zhCN} theme={{
                components: {
                    Segmented: {
                        itemHoverBg: '#1876ff30',
                        itemActiveBg: '#1876ff60',
                        itemHoverColor: '#1876ff',
                        itemSelectedBg: '#1876ff',
                        itemSelectedColor: 'white',
                    },
                    InputNumber: {
                        controlWidth: 60,
                        addonBg: '#1876ff20',
                    },
                    Menu: {
                        itemHeight: 32,
                    },
                },
            }}>
                <Outlet />
            </ConfigProvider>
        </StyleProvider>
    );
}
